import React, { Component } from 'react'
import 'antd/dist/antd.css'
import { Slider } from 'antd'
import PropTypes from 'prop-types'

class SliderOne extends Component {

    //props 默认值
    static defaultProps = {
        props: 'true'
    }

    //props 类型验证
    static propTypes = {
        flag: PropTypes.string
    }

    render() {
        return (
            <div style={style}>
                <Slider vertical range marks={marks} step={1} defaultValue={[20, 50]} />
            </div>
        )
    }
}

const style = {
    display: 'inline-block',
    height: 500,
    marginLeft: 70,
    marginTop: 50
}

const marks = {
    0: {
        style: {
            color: 'red'
        },
        label: <strong>0</strong>
    },
    100: {
        style: {
            color: 'red'
        },
        label: <strong>100</strong>
    }
}

export default SliderOne